package com.haiyou.common.constant;

/**
 * 响应状态码与提示语
 *
 * @author : HejinYo   hejinyo@gmail.com
 * @date : 2017/8/5 18:25
 */
public enum MessageCode {
    /**
     * 500通用请求异常
     * 200返回请求正常
     */
    ERROR(500, "服务器繁忙"),
    LOGIN_PASSWORD_ERROR(1113, "用户密码错误"),
    PASSWORD_NONULL(1114, "用户密码不能为空"),
    PASSWORD_NOEQUAL(1115, "两次密码不一致"),
    WRONG_PHONE_ERRO(1139,"手机号码不能为空"),
    FORM_ERROR(1140,"表单验证异常"),
    ASSIST_PHONE_ERROR(1141,"助手手机号错误"),
    PHONE_CODE_EMPTY(1142,"手机验证码不能为空"),
    VERIFICATION_CODE_ERROR(1143,"手机验证码错误"),
    EXIST_DATA(2000,"数据已存在"),
    SUCCESS(200, "成功");

    private final int code;
    private final String message;

    MessageCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
